package com.zjcode.cdcer.controller;

import com.chinatechstar.component.commons.controller.BaseController;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.GastroscopeDiagnosisInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName:GastroscopeDiagnosisInfoController
 * @功能：胃镜诊疗总量
 * @author：wlei
 * @日期：2022/7/27-01:09
 **/
@RestController
@Slf4j
@RequestMapping("/v1/gastroscopediagnosis/")
public class GastroscopeDiagnosisInfoController extends BaseController {

    @Autowired
    private GastroscopeDiagnosisInfoService diagnosisInfoService;

    @GetMapping("listAllByUser")
    public JsonObj listAllByUser() {
        PageData pageData = getPageData();
        JsonObj result = diagnosisInfoService.listAllByUser(pageData);

        return result;
    }

    @PostMapping("updateRecords")
    public JsonObj updateRecords() {
        PageData pageData = getPageData();
        JsonObj result = diagnosisInfoService.updateRecords(pageData);
        return result;
    }
}
